package com.zbs.framework.dao.permission.service;

import com.zbs.framework.dao.permission.entity.Permission;
import com.zbs.framework.dao.permission.service.model.ServicePermission;

import java.util.List;

public interface PermissionService {
    
    /**
     * 新增权限
     * @param serviceName
     * @param name
     * @param description
     * @param extra
     * @param overwriteAllowed
     * @return
     */
    Permission save(String serviceName, String name, String description, String extra,String path, boolean overwriteAllowed);

    /**
     * 编辑权限
     * @param id
     * @param serviceName
     * @param name
     * @param description
     * @param extra
     */
    void edit(Long id, String serviceName, String name, String description,String path, String extra);

    /**
     * 删除权限
     * @param id
     */
    void delete(Long id);

    /**
     * 获取服务权限
     * @param serviceName
     * @return
     */
    List<ServicePermission> findServicePermissions(String serviceName);

    /**
     * 获取所有权限基础信息
     * @return
     */
    List<Permission> findAllPerms();
}
